package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.Product;
import cn.wolfcode.trip.base.domain.ShopingCar;
import cn.wolfcode.trip.base.query.ProductQueryObject;
import cn.wolfcode.trip.base.query.QueryObject;
import com.github.pagehelper.PageInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ProductMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Product entity);

    Product selectByPrimaryKey(Long id);

    List<Product> selectAll();

    int updateByPrimaryKey(Product entity);

    List<Product> selectForList(ProductQueryObject qo);

    List<Product> getOrderProducts(Long[] arr);

    Integer getAmountByProductId(Long productId);

    void updateAmount(@Param("productId") Long productId, @Param("amount") Integer amount);

    /*void insertRelation(ShopingCar car);

    ShopingCar selectShopingCar(ShopingCar car);

    void updateRelation(ShopingCar car);*/

}